package cn.snorlaxzjt.LBSserver.controller;

import cn.snorlaxzjt.LBSserver.business.UserBusiness;
import cn.snorlaxzjt.LBSserver.common.Result;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("api/mail")
@Api(value = "MailController")
public class EmailController
{
    @Resource
    private UserBusiness UserBusiness;

    @PostMapping(value = "/sendEmail")
    public Result<Void> mail(@RequestParam String address) {
        return UserBusiness.sendEmail(address);
    }
}
